package vip.xiaonuo.modular.business.controller;

import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.core.pojo.response.ResponseData;
import vip.xiaonuo.core.pojo.response.SuccessResponseData;
import vip.xiaonuo.modular.business.entity.BiUserIndexColor;
import vip.xiaonuo.modular.business.service.UserIndexColorService;

import javax.annotation.Resource;

/**
 * @Author: liu
 * @Date:2022/9/2
 */
@Api(tags = "用户指标颜色控制器")
@RestController
public class BiUserIndexColorContorller {
    @Resource
    private UserIndexColorService userIndexColorService;

    @PostMapping("/business/indexColor/queryColor")
    public ResponseData queryColor(@RequestBody BiUserIndexColor param){
        return new SuccessResponseData(userIndexColorService.getBiIndexColor(param));
    }

    @PostMapping("/business/indexColor/updateColor")
    public ResponseData updateColor(@RequestBody BiUserIndexColor param){
        userIndexColorService.updateColor(param);
        return new SuccessResponseData();
    }
}
